import Vue from 'vue';
import Vuex from 'vuex';
import {send_code,login,getpermiss_list} from '../js/getApi.js'
import {makeRouter} from '../js/unit.js'
Vue.use(Vuex);


const store = new Vuex.Store({
  state: {
    role:sessionStorage.getItem('role'),
    token:sessionStorage.getItem('token')
  },
  mutations: {
    getToken(state,data){
        state.token=data;
        sessionStorage.setItem('token',data);

    },
    setrole(state,data){
      state.role=data;
      sessionStorage.setItem('role',data);
    }
  }
})



export default store;
